| ![]() |
Web application configuration is required if you plan to host your WebDAV Server in IIS. If you are creating HttpListener-based WebDAV server no IIS is required to be installed.
Open your IIS MMC console and create web application that will be the root of your WebDav Server storage. This web application must be mapped to the folder where your \bin folder with dlls and web.config file resides. To avoid Web Folders client bags on Windows XP and Windows Vista we recommend mapping you WebDAV server to the root of the website.
Below we will create a wildcard application map in IIS and catch all verbs send to server.
Your WebDAV server application can utilize Integrated ASP.NET application pool or Classic application pool.
Integrated Application Pool
To run your web application in the Integrated application pool you must enable ASP.NET via ‘Control Panel->Programs and Features->Turn Windows features on or off’. You do not need to crate aspnet_isapi.dll mapping or configure IIS 7 via MMC console. IIS 7 will use <system.webServer> tag from your web.config file to configure handler mappings:
<configuration>
...
<system.webServer>
<handlers>
<clear
/>
<add
name="My WebDAV Handler"
path="*" verb="*" type="WebDAVServer.SqlStorage.WebDAVHandler,
WebDAVServer.SqlStorage" preCondition="integratedMode,runtimeVersionv2.0" />
</handlers>
...
</system.webServer>
</configuration>
Classic Application Pool if ASP.NET is Enabled
To run WebDAV server in Classic application pool at a minimum ISAPI Extensions must be enabled. Optionally you can enable ASP.NET, that will simplify your configuration efforts. If you have enabled ASP.NET the IIS will use <system.webServer> tag from your web.config file for wildcard mappings:
<configuration>
...
<system.webServer>
<handlers>
<clear
/>
<add
name="aspnet_isapi 32-bit"
path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
<add
name="aspnet_isapi 64-bit"
path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
</handlers>
...
</system.webServer>
</configuration>
Note that web.config files
provided with WebDAV server samples require ASP.NET to be enanbled.
Classic Application Pool if ASP.NET is Disabled
In case you would like to avoid
enabling ASP.NET you can configure Handler Mappings via MMC console. In this
case open IIS MMC console and click on your web application. Than go to
Handler Mappings. Click Add Script Map. Fill in the
Edit Script Map form:
Request Path - *
Executable -
<Windows Install Folder>\Microsoft.NET\Framework\<.Net Framework
Version>\aspnet_isapi.dll
Request Restrictions -> Mapping Tab ->
Invoke handler only if request is mapped to – Unchecked
Request Restrictions
-> Verbs Tab – All Verbs
To create application map right click on your web application in
IIS 6 MMC console and go to Properties->Virtual Directory
Tab->Configuration. Click Insert to add new wildcard
map.
Executable - <Windows Install
Folder>\Microsoft.NET\Framework\<.Net Framework
Version>\aspnet_isapi.dll
Verify that file exists - Unchecked
On Home Directory tab of your application properties set Execute permissions to Scripts only and allow reads.
To create application map right click on your web application in
IIS 5 MMC console and go to Properties->Virtual Directory
Tab->Configuration. Click Add to add new application extension
mapping.
Executable - <Windows Install
Folder>\Microsoft.NET\Framework\<.Net Framework
Version>\aspnet_isapi.dll
Extension - .*
Verbs – All verbs
Verify
that file exists – Unchecked
On Home Directory tab of your application properties set Execute permissions to Scripts only and allow reads.